@import "./variables.scss";
#app {
  .main-container {
    // width: calc(100% - 300px);
    // max-width: calc(100% - 300px);
    width: 100%;
    height: 100%;
    transition: margin-left 0.28s;
    position: relative;
  }

  .sidebar-container {
    transition: width 0.28s;
    width: $sideBarWidth !important;
    background-color: $menuBg;
    height: 100%;
    font-size: 0px;
    z-index: 99;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    // 系统选择导航栏
    .left-select-system{
      width: 100px;
      height: 100%;
      background-color: $activeMenuBg;
      font-size: 16px;
      .select-system-item{
        width: 100px;
        height: 70px;
        // line-height: 50px;
        text-align: center;
        color: $textColor;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        cursor: pointer;
      }
      .select-system-item:hover{
        background-color: #009fa5;
      }
      .is-system-active {
        background-color: #009fa5;
      }
      .is-system-actives {
        background-color: #009fa540;
      }
    }
    // reset element-ui css
    .horizontal-collapse-transition {
      transition: 0s width ease-in-out, 0s padding-left ease-in-out,
        0s padding-right ease-in-out;
    }

    .scrollbar-wrapper {
      overflow-x: hidden !important;
    }

    .el-scrollbar__bar.is-vertical {
      right: 0px;
    }

    .el-scrollbar {
      height: 100%;
      width: 200px;
    }

    &.has-logo {
      .el-scrollbar {
        height: calc(100% - 50px);
      }
    }

    .is-horizontal {
      display: none;
    }

    a {
      display: inline-block;
      width: 200px;
      overflow: hidden;
    }

    .svg-icon {
      margin-right: 16px;
    }

    .sub-el-icon {
      margin-right: 12px;
      margin-left: -2px;
    }

    .el-menu {
      border: none;
      height: 100%;
      width: 100% !important;
    }

    // 菜单栏选中样式修改
    .submenu-title-noDropdown,
    .el-submenu__title {
      width: 200px !important;
      border-top: 1px solid #499eba;
      border-bottom: 1px solid #90abb3;
      height: 50px !important;
      line-height: 50px !important;
      i {
        color: $textColor !important;
      }
      &:hover,
      &.is-active {
        background-color: $activeMenuBg !important;
        color: $activeMenuText !important;
        i {
          color: $activeMenuText !important;
        }
      }
    }

    & .nest-menu .el-submenu > .el-submenu__title,
    & .el-submenu .el-menu-item {
      border-bottom: 1px solid;
      border-image: linear-gradient(to right, #1d5466, white, #1d5466) 1 10;
      background-color: $subMenuBg !important;
      &:hover,
      &.is-active {
        font-size: 16px;
        background-color: $activeMenuBg !important;
        color: $activeMenuText !important;
      }
    }
  }

  .hideSidebar {
    .sidebar-container {
      width: 54px !important;
    }

    .main-container {
      margin-left: 0;
      width: 100%;
    }

    .submenu-title-noDropdown {
      padding: 0 !important;
      position: relative;

      .el-tooltip {
        padding: 0 !important;

        .svg-icon {
          margin-left: 20px;
        }

        .sub-el-icon,
        .myself-icons {
          margin-left: 19px;
        }
      }
    }

    .el-submenu {
      overflow: hidden;

      & > .el-submenu__title {
        padding: 0 !important;

        .svg-icon {
          margin-left: 20px;
        }

        .sub-el-icon {
          margin-left: 19px;
        }

        .el-submenu__icon-arrow {
          display: none;
        }
      }
    }

    .el-menu--collapse {
      .el-submenu {
        & > .el-submenu__title {
          & > span {
            height: 0;
            width: 0;
            overflow: hidden;
            visibility: hidden;
            display: inline-block;
          }
        }
      }
    }
  }

  .el-menu--collapse .el-menu .el-submenu {
    min-width: $sideBarWidth !important;
  }

  // mobile responsive
  .mobile {
    .main-container {
      margin-left: 0px;
    }

    .sidebar-container {
      transition: transform 0.28s;
      width: $sideBarWidth !important;
    }

    &.hideSidebar {
      .sidebar-container {
        pointer-events: none;
        transition-duration: 0.3s;
        transform: translate3d(-$sideBarWidth, 0, 0);
      }
    }
  }

  .withoutAnimation {
    .main-container,
    .sidebar-container {
      transition: none;
    }
  }
}

// when menu collapsed
.el-menu--vertical {
  & > .el-menu {
    .svg-icon {
      margin-right: 16px;
    }
    .sub-el-icon {
      margin-right: 12px;
      margin-left: -2px;
    }
  }

  .nest-menu .el-submenu > .el-submenu__title,
  .el-menu-item {
    &:hover {
      background-color: $activeMenuBg !important;
      color: $activeMenuText !important;
    }
    &.is-active {
      background-color: $activeMenuBg !important;
      color: $activeMenuText !important;
    }
  }

  // the scroll bar appears when the subMenu is too long
  > .el-menu--popup {
    max-height: 100vh;
    overflow-y: auto;

    &::-webkit-scrollbar-track-piece {
      background: #d3dce6;
    }

    &::-webkit-scrollbar {
      width: 6px;
    }

    &::-webkit-scrollbar-thumb {
      background: #99a9bf;
      border-radius: 20px;
    }
  }
}
